package com.rightsidetech.system.service;

import com.github.pagehelper.PageInfo;
import com.rightsidetech.commom.base.PageRequest;
import com.rightsidetech.commom.base.ResponseData;
import com.rightsidetech.commom.service.IService;
import com.rightsidetech.system.dtos.request.store.*;
import com.rightsidetech.system.dtos.response.store.*;
import com.rightsidetech.system.entity.store.SysStoreAccountInfo;
import com.rightsidetech.system.entity.store.SysStoreInfo;
import com.rightsidetech.system.entity.store.SysStoreLoginHistory;

import java.math.BigDecimal;
import java.util.List;

/**
 * @Package: com.rightsidetech.system.service
 * @ClassName: SysStoreInfoService
 * @Author: yinj
 * @CreateTime: 2021/10/20 15:16
 */
public interface SysStoreInfoService extends IService<SysStoreInfo,Long> {
    ResponseData<PageInfo<SysStoreInfoResp>> page(SysStoreInfoReq request);

    ResponseData add(AddSysStoreInfoReq request,String provice, String city, String area);

    String getMaxStoreNo();

    ResponseData update(UpdateSysStoreInfoReq request,SysStoreInfo sysStoreInfo);

    ResponseData<SysStoreInfoResp> findDetails(Long id,Long agentInfoId);

    ResponseData open(Long id, Byte status,Long agentInfoId);

    ResponseData del(Long id, Long agentInfoId);

    List<StoreResp> nearestStore(UserStoreReq req) throws Exception;

    StoreResp findOne(Long id);

    SysStoreOrderDetailResp findOrderDetailByStoreId(Long id);

    SysStoreAccountInfo findStoreAccountInfoByStoreId(Long storeId);

    ResponseData<List<StoreSearchResp>> search(String content,Long agentInfoId,Long areaId);

    ResponseData<List<StoreSearchResp>> searchOpen(String content,Long agentInfoId,Long areaId);

    ResponseData updateStoreOrder(Long storeId, BigDecimal actualAmout);

    List<SysStoreInfoResp> exportStoreList(SysStoreInfoReq req);

    Long storeAppCheckToken(String tokenStoreApp);

    SysStoreInfo selectByPrimaryKey(Long id);

    SysStoreInfo selectByPrimaryKeyByStatus(Long id);

    Long storeAppCheckTokenTologinId(String tokenStoreApp);

    ResponseData<PageInfo<StoreResp>> storePage(StoreSearchReq req, Long agentInfoId);

    PageInfo<TdCommodityAgentAppStoreListResp> storeOrderStatisPage(PageRequest req, Long agentInfoId);

    ResponseData<StoreResp> getStoreByCode(String storeCode);

    List<ActStoreResp> selectStoreActResp();

    SysStoreLoginHistory selectLoginHistoryByStoreId(Long storeId);

    SysStoreAccountInfo selectByStoreId(Long storeId);

    int updateAccountInfo(SysStoreAccountInfo accountInfo);

    List<Long> selectIdsByAreaIds(List<Long> areaIds);

    List<Long> selectIdsByAgentIds(List<Long> agentIds);

    SysStoreInfo findNearStoreInfo(BigDecimal Longitude,BigDecimal Latitude);

    SysStoreOrderDetailResp findStoreByStoreId(Long agentId);

    List<SysStoreInfo> selectBaseByAgentIds(List<Long> agentIds);

    Long selectCountByAgentId(List<Long> agentIds);

    StoreResp selectStoreInfoById(Long id);

    Long selectAgentIdByStoreId(Long storeInfoId);
}
